package com.hnas.ecard.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hnas.core.dto.DTOPagedList;
import com.hnas.ecard.dao.MerchantDetailDao;
import com.hnas.ecard.orm.MerchantDetail;
import com.hnas.ecard.service.MerchantDetailService;
import com.hnas.ecard.service.dto.DTOMerchantDetail;
import com.hnas.ecard.service.search.DTOMerchantDetailSearch;

@Component("merchantDetailService")
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public class MerchantDetailServiceImpl implements MerchantDetailService{

	@Autowired
	private MerchantDetailDao merchantDetailDao;
	
	@Override
	public MerchantDetail saveOrUpdate(DTOMerchantDetail vo) {
		return this.merchantDetailDao.saveOrUpdate(vo);
	}

	@Override
	public DTOPagedList<DTOMerchantDetail> page(DTOMerchantDetailSearch criteria) {
		return this.merchantDetailDao.page(criteria);
	}

	@Override
	public DTOMerchantDetail findById(String id) {
		return this.merchantDetailDao.findById(id);
	}

	@Override
	public void deleteById(String id) {
		this.merchantDetailDao.deleteById(id);
	}

}
